<template>
	<view class="container">
		<view class="header">
			<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
			<text class="title">视频推流App</text>
		</view>
		
		<view class="content">
			<view class="info-box">
				<text class="info-title">功能介绍</text>
				<text class="info-text">本应用支持视频推流推流与拉流功能，可以：</text>
				<view class="feature-list">
					<text class="feature-item">• 创建自己的推流间</text>
					<text class="feature-item">• 观看他人的推流</text>
					<text class="feature-item">• 查看历史回放</text>
				</view>
			</view>
			
			<view class="button-group">
				<button type="primary" class="btn" @click="navToPush">开始推流</button>
				<button type="default" class="btn" @click="navToPlay">观看推流</button>
			</view>
		</view>
		
		<view class="footer">
			<text class="footer-text">视频推流技术演示 v1.0.0</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 使用配置文件，无需在这里存储服务器地址
			}
		},
		computed: {
			serverUrl() {
				return this.$serverConfig.rtmp.liveUrl();
			}
		},
		methods: {
			navToPush() {
				uni.navigateTo({
					url: '/pages/push/push'
				});
			},
			navToPlay() {
				uni.navigateTo({
					url: '/pages/play/play'
				});
			}
		}
	}
</script>

<style>
	.container {
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		padding: 30rpx;
	}
	
	.header {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 50rpx 0;
	}
	
	.logo {
		width: 160rpx;
		height: 160rpx;
	}
	
	.title {
		font-size: 48rpx;
		font-weight: bold;
		margin-top: 20rpx;
		color: #333;
	}
	
	.content {
		flex: 1;
		padding: 30rpx 0;
	}
	
	.info-box {
		background-color: #f8f8f8;
		border-radius: 16rpx;
		padding: 30rpx;
		margin-bottom: 40rpx;
	}
	
	.info-title {
		font-size: 36rpx;
		font-weight: bold;
		margin-bottom: 20rpx;
		color: #333;
	}
	
	.info-text {
		font-size: 28rpx;
		color: #666;
		margin-bottom: 20rpx;
		line-height: 1.5;
	}
	
	.feature-list {
		padding-left: 20rpx;
	}
	
	.feature-item {
		font-size: 28rpx;
		color: #666;
		line-height: 2;
		display: block;
	}
	
	.button-group {
		margin: 40rpx 0;
	}
	
	.btn {
		margin-bottom: 30rpx;
	}
	
	.footer {
		text-align: center;
		padding: 30rpx 0;
		border-top: 1px solid #eee;
	}
	
	.footer-text {
		font-size: 24rpx;
		color: #999;
	}
</style>
